﻿using System.Xml.Serialization;
using BrettM.Web.Restful;

namespace BrettM.SimpleDemo.WebApp.Models
{
    [XmlRoot("Customer")]
    public class Customer
        : IETagable
    {
        [XmlAttribute]
        public string Code { get; set; }

        [XmlElement]
        public string FirstName { get; set; }

        [XmlElement]
        public string LastName { get; set; }

        [XmlElement]
        public string Telephone { get; set; }


        string IETagable.ETag
        {
            get { return this.GetHashCode().ToString(); }
        }
    }
}